using System;
using System.Windows;

namespace RFS.WPF.utils
{
    public static class X
    {
        
        public static void UseUIThread(this object o, Action func)
        {
            if (Application.Current!=null )
            Application.Current.Dispatcher.Invoke(func);
            else
            {
                func?.Invoke();
            }
        }
        
    }
}